#!/bin/bash
echo "检测是否有被攻击的漏洞"
if [ "$1" == "" ]; then
	echo "输入contoler目录"
	return
fi
grep -E '"(GET|POST|REQUEST|COOKIE)"' $1/* > o
echo "总计"
awk -F"[(,)]" '{print $3"\t"$4"\t"$5}' o | sort | uniq -c

echo -e "未列入防攻击的："
awk -F"[(,)]" '{
	if($4 != " \"intval\"" && $4 != " \"trim\"" && $4 != " \"floatval\"")
		print $0;
}' o

